﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace handvn.Models
{
    public class HandvnContext: DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<handvn.Models.handContext>());

        public DbSet<Categories> Categories { get; set; }
        public DbSet<DetailCategories> DetailCategories { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<User> Users { get; set; }

        public DbSet<CategoriesUser> CategoriesUser { get; set; }
        public DbSet<Images> Images { get; set; }
        public DbSet<Comment> Comment { get; set; }
        public DbSet<KeyWord> Key { get; set; }
        public DbSet<Parameters> Parameters { get; set; }
        public DbSet<AccountSystem> AccountSystem { get; set; }
        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        //}
    }
}